<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/tag_lib.jsp"%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>스프링 테스트 예제</title>
	</head>
	<body>
	    Article List<br/><br />
        <hr />
        <c:if test="${!empty articleList}">
            <table>
                <thead>
                    <tr>
                        <td>Board No</td>
                        <td>Article No</td>
                        <td>Parent Article No</td>
                        <td>Order</td>
                        <td>Article Title</td>
                        <td>Creator No</td>
                        <td>Created Datetime</td>
                    </tr>
                </thead>
                <tbody>
	            <c:forEach var="article" items="${articleList}">
	                <tr>
                        <td>${article.boardNo}</td>
                        <td>${article.articleNo}</td>
                        <td>${article.parentArticleNo}</td>
                        <td>${article.articleOrder}</td>
                        <td><a href="./read.jude?articleNo=${article.articleNo}&boardNo=${article.boardNo}">${article.title}</a></td>
                        <td>${article.creatorNo}</td>
                        <td>${article.createdDatetime}</td>
	                </tr>
	            </c:forEach>    
                </tbody>
            </table>
        </c:if>
        <c:if test="${empty articleList}">
            <h1>결과가 없습니다.</h1>
        </c:if>
        <hr />
        <a href="./createForm.jude?boardNo=${boardNo}">Create article</a>
        <a href="./form.jude?boardNo=${boardNo}&mode=create">Form(Create) article</a>
	</body>
</html>